import { ref, onMounted } from 'vue'
import { getBannerService } from '@/api/Layout'

export const useBanner = () => {
  const bannerList = ref([])
  const getBanner = async () => {
    const res = await getBannerService(2)
    bannerList.value = res.data.result
  }
  onMounted(() => getBanner())
  return {
    bannerList
  }
}
